package com.benny_driving.thread;

import android.os.Handler;
import android.os.Looper;
import com.benny_driving.act.AppDesDriAct;
import com.benny_driving.entity.Form;
import com.benny_driving.http.dao.impl.HttpDaoImpl;

public class AppDesDriSubmitThread extends Thread {
	private static Handler handler = null;
	private Form form;

	public AppDesDriSubmitThread(Form paramForm) {
		this.form = paramForm;
		handler = new Handler();
	}

	public void run() {
		Looper.prepare();
		try {
			Boolean localBoolean = HttpDaoImpl.getInstance()
					.sendForm(this.form);
			System.out.println("localBoolean" + localBoolean);
			AppDesDriAct.handler.sendMessage(handler.obtainMessage(
					AppDesDriAct.GETSUBMIT, localBoolean));
		} catch (Exception localException) {
			AppDesDriAct.handler.sendMessage(handler.obtainMessage(
					AppDesDriAct.NETWORK_ERROR, "null"));
		} finally {
			Thread.currentThread().interrupt();
		}
	}
}